<template>
<uni-shadow-root class="partials-productList-ticketOneColumnSlide-index"><template name="ticketOneColumnSlide">
<block v-if="relateBean.length!=0">
  <scroll-view class="ticket_one_column_slide" scroll-x="true">
    <view v-for="(result,index) in (relateBean)" :key="result.index" class="ticket_one_column_slide_item" @click="tolinkUrl" :data-info="result">
       <view class="ticket_one_column_slide_item_top">
         <image class="ticket_img" mode="aspectFill" :src="(result.imagePath)+'?x-oss-process=style/preview'"></image>
         <view class="ticket_discount" v-if="result.discount" :style="'background:'+(defaultColor)">
           <text style="font-size:28rpx;font-weight:bold;color:#fff;margin-bottom:6rpx;">{{result.discount}}</text>
           <text style="font-size:20rpx;color:#fff">折起</text>
         </view>
       </view>
       <view class="ticket_one_column_slide_item_bottom">
         <text class="ticket_name">{{result.name}}</text>
         <text class="ticket_time">{{result.readyTimeStr}}</text>
         <view class="ticket_one_column_slide_item_price" v-if="result.promotion">
            ￥<text class="ticket_one_column_slide_item_true_price">{{result.promotionPrice}}</text>
            <view class="font_color"><text class="ticket_one_column_slide_item_tagprice">元起</text></view>
          </view>
          <view class="ticket_one_column_slideitem_price" v-else>
            ￥<text class="ticket_one_column_slide_item_true_price">{{result.price}}</text>
            <view class="font_color"><text class="ticket_one_column_slide_item_tagprice">元起</text></view>
          </view>
       </view>
    </view>
  </scroll-view>
</block>
<block v-if="relateBean.length==0">
  <view class="noproduct">
    <image mode="widthFix" src="https://image1.sansancloud.com/xianhua/2019_12/16/15/54/55_950.jpg?x-oss-process=style/preview_120"></image>
    <text>没有相关商品</text>
  </view>
</block>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/productList/ticketOneColumnSlide/index'

Component({})

export default global['__wxComponents']['partials/productList/ticketOneColumnSlide/index']
</script>
<style platform="mp-weixin">
.ticket_one_column_slide{
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  flex-wrap: nowrap;
  white-space:nowrap;
  overflow: hidden;
  padding:10rpx 20rpx;
  box-sizing:border-box;

}
.ticket_one_column_slide_item{
  width:210rpx;
  display:inline-block;
  text-align:center;
  position: relative;
  padding:10rpx;  
}
.ticket_one_column_slide_item_top{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ticket_discount{
  position: absolute;
  left: 20rpx;
  top: -10rpx;
  border-radius: 6rpx;
  padding: 4rpx 10rpx;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 80rpx;
}
.ticket_img{
  width: 100%;
  height: 300rpx;
}
.ticket_one_column_slide_item_bottom{
  display: flex;
  flex-direction: column;
}
.ticket_name{
  height:75rpx;
  text-align:left;
  font-size:28rpx;
  font-weight: bold;
  margin-top:10rpx;
  white-space:normal;
  display:-webkit-box;
  word-break:break-all;
  text-overflow:ellipsis;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  margin-bottom:10rpx;
}
.ticket_time{
  font-size: 26rpx;
  color: #999;
  text-align:left;
  margin-bottom: 10rpx;
  height:32rpx;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  width:100%;
}
.ticket_one_column_slide_item_price{
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  color: #ff826e;
  font-size: 24rpx;
}
.ticket_one_column_slide_item_true_price{
  font-size: 38rpx;
  line-height:38rpx;
}
.font_color{
  color: #a3a3a3;
  font-size:24rpx;
  margin-left:6rpx;
  display: flex;
  align-items: center;
}
.ticket_one_column_slide_item_tagprice{
  text-decoration:none;
}
/*没有相关商品  */
.noproduct{
  width: 100%;
  height: 200rpx;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.noproduct image{
  width: 150rpx;
  height: 150rpx;
  margin: 0 auto;
}
.noproduct text{
  font-size: 30rpx;
}
</style>